package com.rightsidetech.system.service;

import com.github.pagehelper.PageInfo;
import com.rightsidetech.commom.base.DelReq;
import com.rightsidetech.commom.base.PageRequest;
import com.rightsidetech.commom.base.ResponseData;
import com.rightsidetech.system.dtos.request.RuleCommoditySaveReq;
import com.rightsidetech.system.dtos.request.RuleCommodityUpReq;
import com.rightsidetech.system.dtos.request.SysRuleStatusReq;
import com.rightsidetech.system.dtos.response.SysRuleCommodityDetailResp;
import com.rightsidetech.system.dtos.response.SysRuleCommodityPageResp;

import java.math.BigDecimal;
import java.util.List;

public interface SysRuleCommodityIntegralService {

    ResponseData save(RuleCommoditySaveReq req) throws Exception;

    ResponseData<PageInfo<SysRuleCommodityPageResp>> page(PageRequest req);

    ResponseData<List<SysRuleCommodityPageResp>> getChild(DelReq req);

    ResponseData<SysRuleCommodityDetailResp> detail(DelReq req);

    ResponseData update(RuleCommodityUpReq req) throws Exception ;

    ResponseData updateStatus(SysRuleStatusReq req);

    BigDecimal findRuleValueByIdAndBarCode(Long commodityId,String barCode);
}
